<html>
<head><meta charset="utf-8"><title>VFS eagerly loads all .rs files in the project directory · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html">VFS eagerly loads all .rs files in the project directory</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="223152667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223152667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223152667">(Jan 18 2021 at 18:40)</a>:</h4>
<p>is there a way to tell RA not to look in hidden folders?</p>



<a name="223152672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223152672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223152672">(Jan 18 2021 at 18:40)</a>:</h4>
<p><a href="http://docs.rs">docs.rs</a> really does need those folders to run</p>



<a name="223152699"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223152699" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223152699">(Jan 18 2021 at 18:40)</a>:</h4>
<p>they aren't in cargo.toml, rust-analyzer is picking them up on its own somehow</p>



<a name="223152823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223152823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223152823">(Jan 18 2021 at 18:42)</a>:</h4>
<p>I see it's in <code>workspace.exclude</code> already, perhaps we should respect that</p>



<a name="223152985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223152985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223152985">(Jan 18 2021 at 18:44)</a>:</h4>
<p>we had to patch tera to work around this, it was taking multiple minutes to startup because <code>globwalk</code> would recurse into ignored directories</p>



<a name="223153180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223153180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223153180">(Jan 18 2021 at 18:46)</a>:</h4>
<p><a href="https://github.com/rust-lang/docs.rs/pull/861/files#r446669961">https://github.com/rust-lang/docs.rs/pull/861/files#r446669961</a></p>



<a name="223153184"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223153184" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223153184">(Jan 18 2021 at 18:46)</a>:</h4>
<p>We have support for that internally<code>Directories::exclude</code> , but the plumbing is missing</p>



<a name="223153685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223153685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223153685">(Jan 18 2021 at 18:52)</a>:</h4>
<p>I'm interested in fixing this if you can give me some instructions on getting started :)</p>



<a name="223154044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223154044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223154044">(Jan 18 2021 at 18:56)</a>:</h4>
<p>(looking)</p>



<a name="223154069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223154069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223154069">(Jan 18 2021 at 18:57)</a>:</h4>
<p>/me has all today free because of the holiday</p>



<a name="223154215"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223154215" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223154215">(Jan 18 2021 at 18:59)</a>:</h4>
<p>I think you'll have to add a workspace-wide <code>exclude</code> field to <a href="https://github.com/rust-analyzer/rust-analyzer/blob/08efb8a94360735f505699021eaa901464c76f4a/crates/project_model/src/cargo_workspace.rs#L35-L39"><code>CargoWorkspace</code></a>.</p>
<p>Then <a href="https://github.com/rust-analyzer/rust-analyzer/blob/08efb8a94360735f505699021eaa901464c76f4a/crates/rust-analyzer/src/reload.rs#L327-L348">this code</a> needs to be changed to append the workspace's <code>exclude</code> list to <code>dirs.exclude</code>.</p>



<a name="223154230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223154230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223154230">(Jan 18 2021 at 18:59)</a>:</h4>
<p>Some conversion of path types might be needed</p>



<a name="223168622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223168622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223168622">(Jan 18 2021 at 22:17)</a>:</h4>
<p><span class="user-mention silent" data-user-id="211727">Jonas Schievink</span> <a href="#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/running.20RA.20on.20docs.2Ers/near/223154215">said</a>:</p>
<blockquote>
<p>I think you'll have to add a workspace-wide <code>exclude</code> field to <a href="https://github.com/rust-analyzer/rust-analyzer/blob/08efb8a94360735f505699021eaa901464c76f4a/crates/project_model/src/cargo_workspace.rs#L35-L39"><code>CargoWorkspace</code></a>.</p>
<p>Then <a href="https://github.com/rust-analyzer/rust-analyzer/blob/08efb8a94360735f505699021eaa901464c76f4a/crates/rust-analyzer/src/reload.rs#L327-L348">this code</a> needs to be changed to append the workspace's <code>exclude</code> list to <code>dirs.exclude</code>.</p>
</blockquote>
<p><span class="user-mention" data-user-id="211727">@Jonas Schievink</span> I'm confused - isn't that already happening here? <a href="https://github.com/rust-analyzer/rust-analyzer/blob/08efb8a94360735f505699021eaa901464c76f4a/crates/rust-analyzer/src/reload.rs#L335">https://github.com/rust-analyzer/rust-analyzer/blob/08efb8a94360735f505699021eaa901464c76f4a/crates/rust-analyzer/src/reload.rs#L335</a><br>
Or is <code>root.exclude</code> different from the workspace?</p>



<a name="223168688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223168688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223168688">(Jan 18 2021 at 22:18)</a>:</h4>
<p><code>root</code> is from <code>.to_roots()</code></p>



<a name="223168703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223168703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223168703">(Jan 18 2021 at 22:18)</a>:</h4>
<p>It's per-package I think</p>



<a name="223168712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223168712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223168712">(Jan 18 2021 at 22:18)</a>:</h4>
<p>oh I see, it doesn't include the workspace itself</p>



<a name="223168715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223168715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223168715">(Jan 18 2021 at 22:18)</a>:</h4>
<p>ok, makes sense</p>



<a name="223168734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223168734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223168734">(Jan 18 2021 at 22:19)</a>:</h4>
<p>should I handle this for JSON projects too? Or only <code>ProjectWorkspace::Cargo</code>?</p>



<a name="223168810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223168810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223168810">(Jan 18 2021 at 22:20)</a>:</h4>
<p>just Cargo should be fine for now</p>



<a name="223168823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223168823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223168823">(Jan 18 2021 at 22:20)</a>:</h4>
<p>rust-project.json can already specify per-package include and exclude lists</p>



<a name="223168830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223168830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223168830">(Jan 18 2021 at 22:20)</a>:</h4>
<p>so external build systems could just use that</p>



<a name="223168951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223168951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223168951">(Jan 18 2021 at 22:22)</a>:</h4>
<p>should I use PathBuf or AbsPathBuf for the exclude?</p>



<a name="223169087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169087">(Jan 18 2021 at 22:25)</a>:</h4>
<p><code>AbsPathBuf</code> seems to make sense, the other code paths also use that</p>



<a name="223169189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169189">(Jan 18 2021 at 22:26)</a>:</h4>
<p>hmm, I'm confused how I actually get this info from cargo_metadata - I don't see <code>exclude</code> on either <a href="https://docs.rs/cargo_metadata/0.12.3/cargo_metadata/struct.Metadata.html"><code>Metadata</code></a> or <a href="https://docs.rs/cargo_metadata/0.12.3/cargo_metadata/struct.Package.html"><code>Package</code></a></p>



<a name="223169204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169204">(Jan 18 2021 at 22:26)</a>:</h4>
<p>I do see <code>workspace_members</code>, maybe I could convince RA to use that directly?</p>



<a name="223169233"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169233" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169233">(Jan 18 2021 at 22:27)</a>:</h4>
<p>hmm, perhaps Cargo doesn't output the relevant data?</p>



<a name="223169240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169240">(Jan 18 2021 at 22:27)</a>:</h4>
<p>let me start by seeing what packages cargo-metadata is actually picking up</p>



<a name="223169243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169243">(Jan 18 2021 at 22:27)</a>:</h4>
<p>I suppose it is only meant to help Cargo with workspace discovery</p>



<a name="223169250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169250">(Jan 18 2021 at 22:28)</a>:</h4>
<p>cargo metadata should respect those settings already</p>



<a name="223169345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169345">(Jan 18 2021 at 22:29)</a>:</h4>
<p>ok something is very fishy because <code>cargo metadata</code> reports 412 packages whether <code>.rustwide</code> exists or not</p>



<a name="223169358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169358">(Jan 18 2021 at 22:29)</a>:</h4>
<p>so somehow RA is getting packages from a source other than cargo metadata</p>



<a name="223169418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169418">(Jan 18 2021 at 22:30)</a>:</h4>
<p>I wish I could diff the memory usage between two RA processes somehow :/</p>



<a name="223169443"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169443" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169443">(Jan 18 2021 at 22:31)</a>:</h4>
<p><code>diff /proc/&lt;pid1&gt;/mem /proc/pid2/mem</code></p>



<a name="223169548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169548">(Jan 18 2021 at 22:32)</a>:</h4>
<p>I think the problem here is that r-a subscribes to every directory containing a Cargo project in the workspace</p>



<a name="223169557"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169557" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169557">(Jan 18 2021 at 22:32)</a>:</h4>
<p>Because we want to listen to file changes, and load all .rs files into the VFS</p>



<a name="223169578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169578">(Jan 18 2021 at 22:33)</a>:</h4>
<p>cargo metadata doesn't tell us which <em>files</em> are part of the projects (it can't)</p>



<a name="223169601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169601">(Jan 18 2021 at 22:33)</a>:</h4>
<p>so we have to assume that all .rs files in the project dir are part of it</p>



<a name="223169619"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169619" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169619">(Jan 18 2021 at 22:33)</a>:</h4>
<p>and even that isn't enough, since it fails to account for complex <code>#[path]</code> usage, which makes <code>std::arch</code> fail to resolve</p>



<a name="223169676"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169676" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169676">(Jan 18 2021 at 22:34)</a>:</h4>
<p>can you get it by walking the <code>mod</code> tree maybe?</p>



<a name="223169687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169687">(Jan 18 2021 at 22:34)</a>:</h4>
<p>maybe I should read <code>docs/dev</code></p>



<a name="223169735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169735">(Jan 18 2021 at 22:35)</a>:</h4>
<p>yeah, I'd love to be able to just start with <code>lib.rs</code> and gradually discover files, but I think that conflicts with other goals</p>



<a name="223169811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169811">(Jan 18 2021 at 22:36)</a>:</h4>
<p>huh this might also mean that <code>include_str!</code>/<code>include_bytes!</code> with any non-<code>.rs</code> file won't ever work</p>



<a name="223169833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169833">(Jan 18 2021 at 22:36)</a>:</h4>
<p><span class="user-mention silent" data-user-id="211727">Jonas Schievink</span> <a href="#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/running.20RA.20on.20docs.2Ers/near/223169811">said</a>:</p>
<blockquote>
<p>huh this might also mean that <code>include_str!</code>/<code>include_bytes!</code> with any non-<code>.rs</code> file won't ever work</p>
</blockquote>
<p>without walking the mod tree, you mean?</p>



<a name="223169842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169842">(Jan 18 2021 at 22:36)</a>:</h4>
<p>with the current setup, yes</p>



<a name="223169852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169852">(Jan 18 2021 at 22:37)</a>:</h4>
<p>let me try this :D</p>



<a name="223169942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169942">(Jan 18 2021 at 22:38)</a>:</h4>
<p>hmm actually I don't know how to test - RA knows that include_str is always a string even if it doesn't know the contents</p>



<a name="223169953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223169953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223169953">(Jan 18 2021 at 22:39)</a>:</h4>
<p><a href="/user_uploads/4715/eOexOy9J_iCG2DuftqUO74ga/image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/eOexOy9J_iCG2DuftqUO74ga/image.png" title="image.png"><img src="/user_uploads/4715/eOexOy9J_iCG2DuftqUO74ga/image.png"></a></div>



<a name="223170060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170060">(Jan 18 2021 at 22:41)</a>:</h4>
<p>so what I'm hearing is this requires major architectural changes</p>



<a name="223170066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170066">(Jan 18 2021 at 22:41)</a>:</h4>
<p>hey <span class="user-mention" data-user-id="133169">@matklad</span> :D</p>



<a name="223170071"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170071" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170071">(Jan 18 2021 at 22:41)</a>:</h4>
<p>the actual contents don't matter much in practice, which is good for us</p>



<a name="223170089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170089">(Jan 18 2021 at 22:41)</a>:</h4>
<p>many built-in derives are just dummys</p>



<a name="223170103"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170103" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170103">(Jan 18 2021 at 22:41)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/running.20RA.20on.20docs.2Ers/near/223170066">said</a>:</p>
<blockquote>
<p>hey <span class="user-mention silent" data-user-id="133169">matklad</span> :D</p>
</blockquote>
<p>how do you feel about walking about the mod tree instead of picking up every .rs file in the project directory? <a href="#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/running.20RA.20on.20docs.2Ers/near/223169548">https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/running.20RA.20on.20docs.2Ers/near/223169548</a></p>



<a name="223170152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170152">(Jan 18 2021 at 22:42)</a>:</h4>
<p>hmm I wonder if rustc could tell us which files are part of the project</p>



<a name="223170160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170160">(Jan 18 2021 at 22:42)</a>:</h4>
<p>isn't there <code>--emit=dep-info</code> or something?</p>



<a name="223170192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170192">(Jan 18 2021 at 22:43)</a>:</h4>
<p>oh well look at that:</p>
<div class="codehilite"><pre><span></span><code>&gt; rustc --emit=dep-info src/main.rs
&gt; cat main.d
main.d: src/main.rs src/x.txt

src/main.rs:
src/x.txt:
</code></pre></div>



<a name="223170284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170284">(Jan 18 2021 at 22:44)</a>:</h4>
<p>seems annoying to parse though</p>



<a name="223170289"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170289" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170289">(Jan 18 2021 at 22:44)</a>:</h4>
<p>how would you load files from within compiler crates though?</p>



<a name="223170298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170298">(Jan 18 2021 at 22:44)</a>:</h4>
<p>you can't just load from disk, you might have to ask the client</p>



<a name="223170305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170305">(Jan 18 2021 at 22:45)</a>:</h4>
<p>I don't follow</p>



<a name="223170312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170312">(Jan 18 2021 at 22:45)</a>:</h4>
<p>when would a file not be on disk?</p>



<a name="223170317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170317">(Jan 18 2021 at 22:45)</a>:</h4>
<p>when it's being edited</p>



<a name="223170326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170326">(Jan 18 2021 at 22:45)</a>:</h4>
<p>rust-analyzer has to look at the in-editor file, not what's on disk</p>



<a name="223170328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170328">(Jan 18 2021 at 22:45)</a>:</h4>
<p>oh oof</p>



<a name="223170335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170335">(Jan 18 2021 at 22:45)</a>:</h4>
<p>can rust-analyzer associate the in-memory file with the filename somehow?</p>



<a name="223170397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170397">(Jan 18 2021 at 22:46)</a>:</h4>
<p>I was thinking it'd be possible to basically "register interest" in a path from the compiler crates, and fetch those files from outside salsa</p>



<a name="223170409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170409">(Jan 18 2021 at 22:46)</a>:</h4>
<p>And feed their contents back in via <code>FileTextQuery</code>, like we do now</p>



<a name="223170422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170422">(Jan 18 2021 at 22:46)</a>:</h4>
<p>However, this is cursed</p>



<a name="223170445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170445">(Jan 18 2021 at 22:47)</a>:</h4>
<p>what makes that cursed?</p>



<a name="223170450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170450">(Jan 18 2021 at 22:47)</a>:</h4>
<p>At least it doesn't feel right to me to use an external fixed-point loop to drive the whole compiler</p>



<a name="223170469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170469">(Jan 18 2021 at 22:47)</a>:</h4>
<p><span aria-label="shrug" class="emoji emoji-1f937" role="img" title="shrug">:shrug:</span> that's how mod trees work though</p>



<a name="223170473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170473">(Jan 18 2021 at 22:47)</a>:</h4>
<p>it'd probably also be slow</p>



<a name="223170494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170494">(Jan 18 2021 at 22:47)</a>:</h4>
<p>theoretically I think you could have them go on forever if you have</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="c1">// x.rs</span>
<span class="cp">#[path = </span><span class="s">"x.rs"</span><span class="cp">]</span><span class="w"></span>
<span class="k">mod</span> <span class="nn">x</span><span class="p">;</span><span class="w"></span>
</code></pre></div>
<p>or something</p>



<a name="223170564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170564">(Jan 18 2021 at 22:48)</a>:</h4>
<p>yup:</p>
<div class="codehilite"><pre><span></span><code>error: circular modules: recurse.rs -&gt; recurse.rs
 --&gt; recurse.rs:3:1
  |
3 | mod x;
  | ^^^^^^
</code></pre></div>



<a name="223170688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170688">(Jan 18 2021 at 22:50)</a>:</h4>
<p>here's another idea: rather than reading every .rs file into memory, could you just register that it exists? and load the contents lazily?</p>



<a name="223170755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170755">(Jan 18 2021 at 22:51)</a>:</h4>
<p><span class="user-mention silent" data-user-id="211727">Jonas Schievink</span> <a href="#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/running.20RA.20on.20docs.2Ers/near/223170397">said</a>:</p>
<blockquote>
<p>I was thinking it'd be possible to basically "register interest" in a path from the compiler crates, and fetch those files from outside salsa</p>
</blockquote>
<p>that's what I meant to say with this</p>



<a name="223170801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170801">(Jan 18 2021 at 22:52)</a>:</h4>
<p>neat, that sounds easier than redesigning the whole abstraction</p>



<a name="223170808"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170808" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170808">(Jan 18 2021 at 22:52)</a>:</h4>
<p>where does the actual file loading happen?</p>



<a name="223170818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170818">(Jan 18 2021 at 22:52)</a>:</h4>
<p><code>vfs</code>?</p>



<a name="223170921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223170921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223170921">(Jan 18 2021 at 22:54)</a>:</h4>
<p>oh no the contents is already an Option, that means we'll have <code>Option&lt;Option&gt;</code> <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="223171142"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223171142" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223171142">(Jan 18 2021 at 22:58)</a>:</h4>
<p><code>vfs::loader::Handle</code> is the file loading interface</p>



<a name="223171149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223171149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223171149">(Jan 18 2021 at 22:59)</a>:</h4>
<p>ok, <code>load_sync</code> is the thing actually reading files off disk</p>



<a name="223171153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223171153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223171153">(Jan 18 2021 at 22:59)</a>:</h4>
<p>well, the one for on-disk files at least</p>



<a name="223171155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223171155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223171155">(Jan 18 2021 at 22:59)</a>:</h4>
<p>which is implemented in <code>vfs-notify</code></p>



<a name="223171244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223171244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223171244">(Jan 18 2021 at 23:00)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">                </span><span class="k">if</span><span class="w"> </span><span class="o">!</span><span class="n">mem_docs</span><span class="p">.</span><span class="n">contains_key</span><span class="p">(</span><span class="o">&amp;</span><span class="n">vfs_path</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                    </span><span class="kd">let</span><span class="w"> </span><span class="n">contents</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">loader</span><span class="p">.</span><span class="n">handle</span><span class="p">.</span><span class="n">load_sync</span><span class="p">(</span><span class="n">path</span><span class="p">);</span><span class="w"></span>
<span class="w">                    </span><span class="n">vfs</span><span class="p">.</span><span class="n">set_file_contents</span><span class="p">(</span><span class="n">vfs_path</span><span class="p">.</span><span class="n">clone</span><span class="p">(),</span><span class="w"> </span><span class="n">contents</span><span class="p">);</span><span class="w"></span>
<span class="w">                </span><span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>does this <em>need</em> to call <code>set_file_contents</code> immediately?</p>



<a name="223171299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223171299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223171299">(Jan 18 2021 at 23:01)</a>:</h4>
<p>hmm that's actually called in not many places</p>
<div class="codehilite"><pre><span></span><code>crates/vfs/src/lib.rs
5://! [`set_file_contents`]. All changes to VFS are logged, and can be retrieved via
35://! [`set_file_contents`]: Vfs::set_file_contents
155:    pub fn set_file_contents(&amp;mut self, path: VfsPath, contents: Option&lt;Vec&lt;u8&gt;&gt;) -&gt; bool {

crates/rust-analyzer/src/reload.rs
250:                    vfs.set_file_contents(vfs_path.clone(), contents);

crates/rust-analyzer/src/main_loop.rs
275:                                    vfs.set_file_contents(path, contents);
536:                        .set_file_contents(path, Some(params.text_document.text.into_bytes()));
568:                    vfs.set_file_contents(path.clone(), Some(text.into_bytes()));

crates/rust-analyzer/src/cli/load_cargo.rs
45:        vfs.set_file_contents(path.clone(), contents);
77:                    vfs.set_file_contents(path.into(), contents);
</code></pre></div>



<a name="223171382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223171382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223171382">(Jan 18 2021 at 23:02)</a>:</h4>
<p>so my idea is that instead of calling <code>set_file_contents</code> immediately, I add a new <code>set_file_state</code> which only stores whether the file exists or not</p>



<a name="223171387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223171387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223171387">(Jan 18 2021 at 23:02)</a>:</h4>
<p>and then <code>get</code> and <code>get_mut</code> load it lazily</p>



<a name="223171395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223171395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223171395">(Jan 18 2021 at 23:02)</a>:</h4>
<p>that does require <code>get</code> to take <code>&amp;mut self</code> though</p>



<a name="223171407"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223171407" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223171407">(Jan 18 2021 at 23:02)</a>:</h4>
<p>or to do <code>RefCell</code> dances</p>



<a name="223172232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223172232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223172232">(Jan 18 2021 at 23:17)</a>:</h4>
<p>hmm, running <code>vfs.iter()</code> requires all the files to be loaded eagerly so RA can tell whether they exist or not</p>



<a name="223172245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223172245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223172245">(Jan 18 2021 at 23:17)</a>:</h4>
<p>why does .iter() need to skip deleted files? I see it's only used by <code>FileSetConfig::partition</code></p>



<a name="223172458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223172458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223172458">(Jan 18 2021 at 23:21)</a>:</h4>
<p>wow your test suite runs <em>fast</em></p>



<a name="223172466"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223172466" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223172466">(Jan 18 2021 at 23:21)</a>:</h4>
<p>this is super impressive</p>



<a name="223172545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223172545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223172545">(Jan 18 2021 at 23:23)</a>:</h4>
<p>wish me luck <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span> </p>
<div class="codehilite" data-code-language="Diff"><pre><span></span><code><span class="gh">diff --git a/crates/vfs/src/lib.rs b/crates/vfs/src/lib.rs</span>
<span class="gh">index f84b9a7b5..d85288780 100644</span>
<span class="gd">--- a/crates/vfs/src/lib.rs</span>
<span class="gi">+++ b/crates/vfs/src/lib.rs</span>
<span class="gu">@@ -153,7 +153,7 @@ impl Vfs {</span>
     pub fn iter(&amp;self) -&gt; impl Iterator&lt;Item = (FileId, &amp;VfsPath)&gt; + '_ {
         (0..self.data.len())
             .map(|it| FileId(it as u32))
<span class="gd">-            .filter(move |&amp;file_id| self.get(file_id).exists())</span>
<span class="gi">+            //.filter(move |&amp;file_id| self.get(file_id).exists())</span>
             .map(move |file_id| {
                 let path = self.interner.lookup(file_id);
                 (file_id, path)
</code></pre></div>



<a name="223172686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223172686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223172686">(Jan 18 2021 at 23:25)</a>:</h4>
<p>oh hmm it actually passes the test suite with that change ??</p>



<a name="223172688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223172688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223172688">(Jan 18 2021 at 23:25)</a>:</h4>
<p>now I'm even more confused</p>



<a name="223172959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223172959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223172959">(Jan 18 2021 at 23:30)</a>:</h4>
<p>ok so I have another question: <code>file_id</code> also filters for deleted files. But files can be deleted at any time, right? So doesn't the caller still need to handle the case where the file was deleted after calling <code>file_id</code>?</p>



<a name="223172969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223172969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223172969">(Jan 18 2021 at 23:30)</a>:</h4>
<p>/me goes to delete that call too</p>



<a name="223173056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223173056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223173056">(Jan 18 2021 at 23:32)</a>:</h4>
<p>/me is worried that there are just no tests for deleted files</p>



<a name="223173079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223173079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223173079">(Jan 18 2021 at 23:32)</a>:</h4>
<p><code>&gt; fd test | xargs rg delete</code> seems to support this conclusion :(</p>



<a name="223173354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223173354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223173354">(Jan 18 2021 at 23:38)</a>:</h4>
<p>I'm not too sure on this but I believe that file-related testing isn't too prevalent in the codebase</p>



<a name="223173411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223173411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223173411">(Jan 18 2021 at 23:38)</a>:</h4>
<p>At least the VFS crate doesn't seem to have a lot of tests <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="223173446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223173446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223173446">(Jan 18 2021 at 23:39)</a>:</h4>
<p>does RA have integration tests? or just unit tests?</p>



<a name="223173714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223173714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223173714">(Jan 18 2021 at 23:44)</a>:</h4>
<p>I'm not sure tbh, not that I can immediately think of. But I also haven't peeked at all the crates properly yet so far.</p>



<a name="223173728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223173728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223173728">(Jan 18 2021 at 23:44)</a>:</h4>
<p>Ah there seem to be a few in the main rust-analyzer crate(in <code>crates\rust-analyzer\tests\rust-analyzer</code>)</p>



<a name="223174406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223174406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223174406">(Jan 18 2021 at 23:57)</a>:</h4>
<p>ok and the last obstacle is somehow I need to get a <code>loader</code> into <code>Vfs</code></p>



<a name="223174492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223174492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223174492">(Jan 18 2021 at 23:58)</a>:</h4>
<p>my first idea was to move it from <code>GlobalState</code> to the Vfs struct, and make it public so it's still accessible, but that breaks because <code>Handle</code> is only in the top-level rust-analyzer crate:</p>
<div class="codehilite"><pre><span></span><code>error[E0412]: cannot find type `Handle` in this scope
  --&gt; crates/vfs/src/lib.rs:69:17
   |
69 |     pub loader: Handle&lt;Box&lt;dyn loader::Handle&gt;, Receiver&lt;loader::Message&gt;&gt;,
   |                 ^^^^^^ not found in this scope
</code></pre></div>
<p>(<code>loader::Handle</code> is something different)</p>



<a name="223174517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223174517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223174517">(Jan 18 2021 at 23:59)</a>:</h4>
<p>hmm I guess I don't need the whole <code>loader</code>, just the handle</p>



<a name="223174926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223174926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223174926">(Jan 19 2021 at 00:06)</a>:</h4>
<p>oh boooo the borrow checker doesn't understand the borrow is released if I return early</p>
<div class="codehilite"><pre><span></span><code>error[E0499]: cannot borrow `*self` as mutable more than once at a time
   --&gt; crates/vfs/src/lib.rs:240:13
    |
233 |     fn get_or_load(&amp;mut self, file_id: FileId) -&gt; &amp;mut FileContents {
    |                    - let&#39;s call the lifetime of this reference `&#39;1`
234 |         if let Some(contents) = &amp;mut self.data[file_id.0 as usize] {
    |                                      --------- first mutable borrow occurs here
235 |             return contents;
    |                    -------- returning this value requires that `self.data` is borrowed for `&#39;1`
...
240 |             self.set_id_contents(file_id, contents);
    |             ^^^^ second mutable borrow occurs here
</code></pre></div>



<a name="223175026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223175026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223175026">(Jan 19 2021 at 00:08)</a>:</h4>
<p>polonius when will you save us</p>



<a name="223175054"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223175054" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223175054">(Jan 19 2021 at 00:09)</a>:</h4>
<p>Iirc there is a comment somewhere in RA that annotates a double hashmap index cause of the same borrowck problem <span aria-label="big smile" class="emoji emoji-1f604" role="img" title="big smile">:big_smile:</span></p>



<a name="223175104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223175104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223175104">(Jan 19 2021 at 00:10)</a>:</h4>
<p>well the difference is this has to do computation in the middle :/ so it can't hold the same borrow the whole time</p>



<a name="223175108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223175108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223175108">(Jan 19 2021 at 00:10)</a>:</h4>
<p>(the computation being <code>set_id_contents</code>)</p>



<a name="223175124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223175124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223175124">(Jan 19 2021 at 00:10)</a>:</h4>
<p>wtf why does this work in playground <a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=08b05ad9f9d41d93d75b57b1285f4309">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=08b05ad9f9d41d93d75b57b1285f4309</a></p>



<a name="223175154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223175154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223175154">(Jan 19 2021 at 00:12)</a>:</h4>
<p>oh apparently the borrow checker only runs if you don't have unreachable code</p>



<a name="223175190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223175190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223175190">(Jan 19 2021 at 00:12)</a>:</h4>
<p>that seems silly</p>



<a name="223175203"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223175203" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223175203">(Jan 19 2021 at 00:12)</a>:</h4>
<p>anyway, mcve: <a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=4dafaf60879fd4ad9886cf56010b51f2">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=4dafaf60879fd4ad9886cf56010b51f2</a></p>



<a name="223175408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223175408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223175408">(Jan 19 2021 at 00:17)</a>:</h4>
<p>I don't think you can get around doing a check first whether its none and then having to index a second time <span aria-label="sad" class="emoji emoji-2639" role="img" title="sad">:sad:</span></p>



<a name="223175414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223175414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223175414">(Jan 19 2021 at 00:17)</a>:</h4>
<p>oh well that's not bad</p>



<a name="223177193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223177193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223177193">(Jan 19 2021 at 00:54)</a>:</h4>
<p>well this turned into an absolute mess but uhhh it does compile</p>



<a name="223180333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223180333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223180333">(Jan 19 2021 at 02:02)</a>:</h4>
<p><a href="https://github.com/rust-analyzer/rust-analyzer/pull/7344">https://github.com/rust-analyzer/rust-analyzer/pull/7344</a></p>



<a name="223199165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223199165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223199165">(Jan 19 2021 at 08:41)</a>:</h4>
<p>I don't think we should do lazy loading, that'd be XY problem</p>



<a name="223199270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223199270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223199270">(Jan 19 2021 at 08:43)</a>:</h4>
<p>(we need to add lazy loading some day, but not today, as this won't help this issue --- we'll just lazy-load files when indexing)</p>



<a name="223199412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223199412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223199412">(Jan 19 2021 at 08:45)</a>:</h4>
<p>Instead, we should add <code>files_excludeDirs: Vec&lt;PathBuf&gt; = [],</code> in <a href="http://config.rs">config.rs</a></p>



<a name="223234491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223234491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223234491">(Jan 19 2021 at 14:36)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> right but the exclude info is not available from cargo metadata. It only gives the packages themselves, not the info it used to decide on the packages</p>



<a name="223234591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223234591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223234591">(Jan 19 2021 at 14:37)</a>:</h4>
<p>We need to support exclude in <code>settings.json</code> anyway</p>



<a name="223234700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223234700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223234700">(Jan 19 2021 at 14:38)</a>:</h4>
<p>so we might as well do this now as the simplest thing for the problem at hand</p>



<a name="223234800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/223234800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#223234800">(Jan 19 2021 at 14:38)</a>:</h4>
<p>Hmm, ok. I'd rather configure it twice than not be able to use rust-analyzer</p>



<a name="224091653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/224091653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#224091653">(Jan 26 2021 at 19:41)</a>:</h4>
<p>This should help <span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span> <a href="https://github.com/rust-analyzer/rust-analyzer/pull/7451">https://github.com/rust-analyzer/rust-analyzer/pull/7451</a></p>



<a name="240093362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/240093362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris B <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#240093362">(May 24 2021 at 18:42)</a>:</h4>
<p>Has there been any movement on getting <code>excludeDirs</code> to work? <a href="https://github.com/rust-analyzer/rust-analyzer/issues/7755">The github issue seems to be open still</a>, and I haven't been able to figure it out. I tried changing <a href="https://github.com/rust-analyzer/rust-analyzer/blob/3926f60cb525592400018b0afb0c0553dabfdb32/crates/rust-analyzer/src/reload.rs#L438">this</a> to explicitly add <code>global_excludes</code> to <code>dirs.exclude</code>, but then I just get a wall of <code>file with a cargo diagnostic was not in vfs</code> errors which takes just as long to process, so I guess flycheck is still looking for the directory I'm trying to ignore.</p>



<a name="240095417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/240095417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#240095417">(May 24 2021 at 18:57)</a>:</h4>
<p>No, no progerss here. I think it should be relatively striaght forward to fix for someone unfamiliar with the code. Let me add some pointers.</p>



<a name="240096204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/240096204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#240096204">(May 24 2021 at 19:02)</a>:</h4>
<p><a href="https://github.com/rust-analyzer/rust-analyzer/issues/7755#issuecomment-847266325">https://github.com/rust-analyzer/rust-analyzer/issues/7755#issuecomment-847266325</a></p>



<a name="240110172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/240110172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris B <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#240110172">(May 24 2021 at 20:51)</a>:</h4>
<p>Thanks. I got the first half working, but the FileSystemWatcher thing is specified by glob patterns that <a href="https://github.com/microsoft/vscode/issues/27051">apparently won't ever support negation</a>. In the cases where the glob pattern encompasses the directories the user wants to ignore, are you okay with walking the package root and sending glob patterns that work around the one to be ignored?</p>



<a name="240160734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/240160734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#240160734">(May 25 2021 at 09:12)</a>:</h4>
<p>We first need to figure out if <code>FIleSystemWatcher</code> is relevant at all -- I think that it should obey VS Code's <code>exclude</code> out of the box, so we don't need any changes there</p>



<a name="240160818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/240160818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#240160818">(May 25 2021 at 09:13)</a>:</h4>
<p>Basically, we need to test, if we set-up files.exclude and rust-analyzer.exclude, <em>why</em> are we not ignoring files? Is this because VFS does traversal? Or is it because watcher sends notifications to us?</p>



<a name="240187211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/240187211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris B <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#240187211">(May 25 2021 at 13:31)</a>:</h4>
<p>In my case the main issue was <a href="https://github.com/rust-analyzer/rust-analyzer/blob/3926f60cb525592400018b0afb0c0553dabfdb32/crates/rust-analyzer/src/reload.rs#L458">here</a>; if you want to exclude a subdirectory of an included directory, the current logic won't catch it. It should be something like:</p>
<div class="codehilite"><pre><span></span><code>    if dirs.include.iter().any(|incl| incl.starts_with(excl) || excl.starts_with(incl)) {
</code></pre></div>
<p>The other thing was from Flycheck; vscode makes it look like the default checkOnSave command is just <code>check</code>, but it actually includes <code>all-targets</code>. I couldn't understand why RA was picking up a mod annotated with #[cfg(test)] just using <code>cargo check</code>, but that explains it. Users might find it helpful if the default in package.json was something that indicated "your command here" since the actual one invoked includes the manfiest and is project-specific.</p>



<a name="240196986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/240196986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#240196986">(May 25 2021 at 14:36)</a>:</h4>
<p>Hm, yeah, the first ones sounds like a bug! Could you send a PR?</p>



<a name="240203289"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/VFS%20eagerly%20loads%20all%20.rs%20files%20in%20the%20project%20directory/near/240203289" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris B <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/VFS.20eagerly.20loads.20all.20.2Ers.20files.20in.20the.20project.20directory.html#240203289">(May 25 2021 at 15:17)</a>:</h4>
<p>Sure thing.  <a href="https://github.com/rust-analyzer/rust-analyzer/pull/8994">https://github.com/rust-analyzer/rust-analyzer/pull/8994</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>